package com.google.code.memoriesalbum.model;

import java.io.Serializable;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;

import com.google.appengine.api.datastore.GeoPt;
import com.google.appengine.api.datastore.Key;
import com.google.gdata.data.photos.PhotoEntry;

/**
 * {@link PhotoEntry}に関する情報を保持するModel.
 * <p>Keyのname値にphotoIdを使用する。</p>
 * @author shin1ogawa
 */
@Model
public class PicasaPhoto implements Serializable {

	private static final long serialVersionUID = 4045081564516392429L;

	@Attribute(primaryKey = true)
	private Key key;

	private Key accountKey;

	private String albumId;

	private String title;

	private String description;

	private GeoPt point;

	private String mediaType;

	@Attribute(persistent = false)
	private byte[] mediaSource;

	private Long schemaVersion = 1L;


	/**
	 * @return the key
	 * @category accessor
	 */
	public Key getKey() {
		return key;
	}

	/**
	 * @param key the key to set
	 * @category accessor
	 */
	public void setKey(Key key) {
		this.key = key;
	}

	/**
	 * @return the title
	 * @category accessor
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title the title to set
	 * @category accessor
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @return the point
	 * @category accessor
	 */
	public GeoPt getPoint() {
		return point;
	}

	/**
	 * @param point the point to set
	 * @category accessor
	 */
	public void setPoint(GeoPt point) {
		this.point = point;
	}

	/**
	 * @param comment the comment to set
	 * @category accessor
	 */
	public void setDescription(String comment) {
		this.description = comment;
	}

	/**
	 * @return the comment
	 * @category accessor
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param albumId the albumId to set
	 * @category accessor
	 */
	public void setAlbumId(String albumId) {
		this.albumId = albumId;
	}

	/**
	 * @return the albumId
	 * @category accessor
	 */
	public String getAlbumId() {
		return albumId;
	}

	/**
	 * @param mediaType the mediaType to set
	 * @category accessor
	 */
	public void setMediaType(String mediaType) {
		this.mediaType = mediaType;
	}

	/**
	 * @return the mediaType
	 * @category accessor
	 */
	public String getMediaType() {
		return mediaType;
	}

	/**
	 * @param byteArray the byteArray to set
	 * @category accessor
	 */
	public void setMediaSource(byte[] byteArray) {
		this.mediaSource = byteArray;
	}

	/**
	 * @return the byteArray
	 * @category accessor
	 */
	public byte[] getMediaSource() {
		return mediaSource;
	}

	/**
	 * @param schemaVersion the schemaVersion to set
	 * @category accessor
	 */
	public void setSchemaVersion(Long schemaVersion) {
		this.schemaVersion = schemaVersion;
	}

	/**
	 * @return the schemaVersion
	 * @category accessor
	 */
	public Long getSchemaVersion() {
		return schemaVersion;
	}

	/**
	 * @param accountKey the accountKey to set
	 * @category accessor
	 */
	public void setAccountKey(Key accountKey) {
		this.accountKey = accountKey;
	}

	/**
	 * @return the accountKey
	 * @category accessor
	 */
	public Key getAccountKey() {
		return accountKey;
	}
}
